#pragma once

#include <SFML/Network.hpp>
#include <string>
#include <queue>
#include <iostream>

namespace U2L
{
	class AsyncReceiver : private sf::Thread
	{
	public:
		AsyncReceiver(void);
		~AsyncReceiver(void);

		void Receive(sf::SocketTCP* _socket);
		bool IsReceiving(void) const;
		bool IsDisconnected(void) const;
		std::wstring GetMsg(void);
	private:
		virtual void Run(void);

		bool m_receiving;
		bool m_disconnected;
		sf::SocketTCP* m_socket;
		std::wstring m_msg;
	};
}